/**
 * Alipay.com Inc.
 * Copyright (c) 2004-2014 All Rights Reserved.
 */
package com.lshtv.enums;

/**
 * 
 * @author danjingyu
 * @version $Id: WorkTypeEnum.java, v 0.1 2014-3-11 下午9:52:43 danjingyu Exp $
 */
public enum WorkItemEnum {

    /** 企业宣传片 */
    ENTIER_MOVIE(1, "ENTIER_MOVIE", "企业宣传片"),

    /** 产品宣传片 */
    LITTLE_MOVIE(2, "LITTLE_MOVIE", "产品宣传片"),

    /** 微电影/MV */
    AD_MOVIE(3, "AD_MOVIE", "微电影/MV"),

    /** 三维/二维/微动画 */
    CATOON_MOVIE(4, "CATOON_MOVIE", "三维/二维/微动画"),

    /** 纪录片 */
    RECORD_MOVIE(5, "RECORD_MOVIE", "纪录片");

    /** 枚举码 */
    private int    value;

    /** 编码 */
    private String code;

    /** 描述 */
    private String description;

    /**
     * 私有构造方法
     * @param value         枚举值
     * @param code          枚举code
     * @param description   枚举描述
     */
    private WorkItemEnum(int value, String code, String description) {
        this.value = value;
        this.code = code;
        this.description = description;
    }

    /**
     * 通过枚举<code>value</code>获得枚举。
     * 
     * @param value 枚举值
     * @return      枚举对象
     */
    public static WorkItemEnum getByValue(int value) {
        for (WorkItemEnum type : values()) {
            if (type.getValue() == value) {
                return type;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

}
